import cv2
import numpy as np
from net import crnn

crnn_model_path = 'models/ocr-lstm.pth'
image_path = '../image/train_1.jpg'

if __name__ == '__main__':
    image = cv2.imread(image_path)
    h, w, _ = image.shape
    scale_image = cv2.resize(image, (w//2, h//2), interpolation=cv2.INTER_AREA)
    box_list = [[322, 288], [564, 297], [562, 338], [319, 329]]
    # print(np.array(boxes_list).shape)
    result = crnn.crnnRecWithBox(scale_image, box_list)
    # print('result:', result)
